package net.cyndeline.stateEvaluation

import net.cyndeline.itemEventFactory.ActionInput
import net.cyndeline.entitySystem.EntityRef

/**
 * Checks if a single entity's properties fulfills a condition, such as
 * having a certain amount of health, items in inventory etc.
 */
trait PropertyCondition {
  
  /**
   * Performs the property comparison.
   * 
   * @param compared An entity involved in the usage of an item. Must be
   * 			   represented in the target data as well (hence being a part
   *       		   of the item usage input).
   * @param targetData The full set of item target data. This may or may not
   * 				   be needed to see if the entity fulfills the condition,
   *        		   but is required since some conditions needs to compare
   *             	   the entity to other targets.
   */
  def fulfillsCondition(compared: EntityRef, targetData: ActionInput): Boolean
}